package net.lainiao.jwt.controller;


import net.lainiao.jwt.bean.ResponseData;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2018/7/12.
 */
@RestController
@RequestMapping("/biz")
public class BizController {

    @Value("${server.port}")
    private String instanceName;

    @RequestMapping("/add")
    @ResponseBody
    public ResponseData add(){
        ResponseData responseData=ResponseData.ok();
        responseData.putDataValue("bizcode","业务新增成功");
        responseData.putDataValue("instance",instanceName);
        return responseData;
    }

    @RequestMapping("/delete")
    @ResponseBody
    public ResponseData delete(){
        ResponseData responseData=ResponseData.ok();
        responseData.putDataValue("bizcode","业务删除成功");
        responseData.putDataValue("instance",instanceName);
        return responseData;
    }


}
